<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%>
<head>
    <title><fmt:message key="folder" /></title>
</head>
<body>
    <div id="folderSearchResultFragment">
        <h1><fmt:message key="folder" /></h1>
        <script type="text/javascript">
            dojo.addOnLoad(function() {
                dojo.query(".folderAjaxDelete").forEach(function(element) {
                    Spring.addDecoration(new Spring.AjaxEventDecoration({
                        elementId: element.id,
                        event: "onclick",
                        popup: "true",
                        params: { decorator: "none" }
                    }));
                })
            });
        </script>
        <c:url var="imgUrl" value="/img/app/icon" />
        <table class="listEntities">
            <thead>
                <tr>
                    <th scope="col">&nbsp;</th>
                    <th scope="col"><fmt:message key="folder_title"/></th>
                    <th scope="col"><fmt:message key="folder_path"/></th>
                    <th scope="col"><fmt:message key="folder_showOnMenu"/></th>
                    <th scope="col"><fmt:message key="folder_sortOrder"/></th>
                    <th scope="col"><fmt:message key="folder_modUser"/></th>
                    <th scope="col"><fmt:message key="folder_modDate"/></th>
                    <th scope="col">&nbsp;</th>
                </tr>
            </thead>
            <tbody>
            <c:forEach items="${folders}" var="folder" varStatus="status">
                <tr>
                    <td>
                        <img src="${imgUrl}/folder.png" />
                    </td>
                    <td>
                        <c:out value="${folder.title}"/>
                    </td>
                    <td>
                        <c:out value="${folder.path}"/>
                    </td>
                    <td>
                        <c:out value="${folder.showOnMenu}"/>
                    </td>
                    <td>
                        <c:out value="${folder.sortOrder}"/>
                    </td>
                    <td>
                        <c:out value="${folder.modUser}"/>
                    </td>
                    <td>
                        <c:out value="${folder.modDate}"/>
                    </td>
                    <td>
                        <c:url var="showUrl" value="/domain/folder/show.action">
                            <c:param name="folder.inode" value="${folder.inode}"/>
                        </c:url>
                        <c:url var="updateUrl" value="/domain/folder/updateForm.action">
                            <c:param name="folder.inode" value="${folder.inode}"/>
                        </c:url>
                        <c:url var="confirmDeleteUrl" value="/domain/folder/confirmDelete.action">
                            <c:param name="folder.inode" value="${folder.inode}"/>
                        </c:url>
                        <a class="actionShow" href="${showUrl}"><fmt:message key="label.link.show"/></a>
                        <a class="actionUpdate" href="${updateUrl}"><fmt:message key="label.link.update"/></a>
                        <a class="actionDelete folderAjaxDelete" id="confirmDeleteUrl${status.index}" href="${confirmDeleteUrl}"><fmt:message key="label.link.delete"/></a>
                    </td>
                </tr>
            </c:forEach>
            <c:forEach items="${htmlPageList}" var="htmlPage" varStatus="status">
                <tr>
                    <td>
                        <img src="${imgUrl}/blog-blue.png" />
                    </td>
                    <td>
                        <c:out value="${htmlPage.title}"/>
                    </td>
                    <td>
                        <c:out value="${htmlPage.pageUrl}"/>
                    </td>
                    <td>
                        <c:out value="${htmlPage.showOnMenu}"/>
                    </td>
                    <td>
                        <c:out value="${htmlPage.sortOrder}"/>
                    </td>
                    <td>
                        <c:out value="${htmlPage.modUser}"/>
                    </td>
                    <td>
                        <c:out value="${htmlPage.modDate}"/>
                    </td>
                    <td>
                        <c:url var="showUrl" value="/domain/htmlPage/show.action">
                            <c:param name="htmlPage.inode" value="${htmlPage.inode}"/>
                        </c:url>
                        <c:url var="updateUrl" value="/domain/htmlPage/updateForm.action">
                            <c:param name="htmlPage.inode" value="${htmlPage.inode}"/>
                        </c:url>
                        <c:url var="confirmDeleteUrl" value="/domain/htmlPage/confirmDelete.action">
                            <c:param name="htmlPage.inode" value="${htmlPage.inode}"/>
                        </c:url>
                        <a class="actionShow" href="${showUrl}"><fmt:message key="label.link.show"/></a>
                        <a class="actionUpdate" href="${updateUrl}"><fmt:message key="label.link.update"/></a>
                        <a class="actionDelete htmlPageAjaxDelete" id="confirmDeleteUrl${status.index}" href="${confirmDeleteUrl}"><fmt:message key="label.link.delete"/></a>
                    </td>
                </tr>
            </c:forEach>
			<c:url var="fileAssetImgPath" value="/" />
            <c:forEach items="${fileAssetList}" var="fileAsset" varStatus="status">
                <tr>
                    <td>
                        <img src="${fileAssetImgPath}${fileAsset.filePath}" />
                    </td>
                    <td>
                        <c:out value="${fileAsset.title}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.filePath}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.showOnMenu}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.sortOrder}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.modUser}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.modDate}"/>
                    </td>
                    <td>
                        <c:url var="showUrl" value="/domain/fileAsset/show.action">
                            <c:param name="fileAsset.inode" value="${fileAsset.inode}"/>
                        </c:url>
                        <c:url var="updateUrl" value="/domain/fileAsset/updateForm.action">
                            <c:param name="fileAsset.inode" value="${fileAsset.inode}"/>
                        </c:url>
                        <c:url var="confirmDeleteUrl" value="/domain/fileAsset/confirmDelete.action">
                            <c:param name="fileAsset.inode" value="${fileAsset.inode}"/>
                        </c:url>
                        <a class="actionShow" href="${showUrl}"><fmt:message key="label.link.show"/></a>
                        <a class="actionUpdate" href="${updateUrl}"><fmt:message key="label.link.update"/></a>
                        <a class="actionDelete fileAssetAjaxDelete" id="confirmDeleteUrl${status.index}" href="${confirmDeleteUrl}"><fmt:message key="label.link.delete"/></a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
</body>
